package com.datastructure.stack;

public class StackTest {
    public static void main(String[] args) {
        //ArrayStack arrayStack = new ArrayStack(5);
        //testStack(arrayStack);

        LinkedStack linkedStack =new LinkedStack();
        testStack(linkedStack);
    }

    public static void testStack(MyStack mStack) {
        mStack.show();
        mStack.push(1);
        mStack.push(3);
        mStack.push(4);
        mStack.push(6);
        mStack.push(2);
        mStack.show();
        mStack.push(8);
        System.out.println("弹出栈顶元素：" + mStack.pop());
        mStack.show();
    }
}
